#include"list.h"
using namespace bit;
using std::cout;
using std::endl;

void test()
{
	std::list<int> it;
	it.push_back(1);
	it.push_back(2);
	it.push_back(3);
	it.push_back(4);
	it.push_back(6);
	it.pop_back();
	it.pop_back();
	it.pop_back();
	it.push_front(3);
	it.sort();
	for (auto ch : it)
	{
		std::cout << ch << " ";
	}
	cout << endl;
	cout << it.front() << endl;
	cout << it.back() << endl;

	//cout << it.max_size() << endl;
	cout << endl;
}
void test2()
{
	std::list<int> fist;
	fist.push_back(1);
	fist.push_back(2);
	fist.push_back(3);
	fist.push_back(4);
	fist.push_back(5);
	fist.push_back(6);
	fist.sort();
	std::list<int> second;
	second.push_back(4);
	second.push_back(5);
	second.push_back(6);
	second.push_back(7);
	second.push_back(8);
	second.sort();
	fist.merge(second);
	for (auto sh : fist)
	{
		cout << sh << " ";
	}
	cout << endl;
}

void test3()
{
	list<int> fist;
	fist.push_back(1);
	fist.push_back(2);
	fist.push_back(3);
	//fist.push_back(4);
	bit::list<int>::iterator it = fist.begin();
	fist.end();
	
	/*for (auto ch : fist)
	{
		cout << ch << " ";
	}
	cout << endl;*/
}
void test4()
{
	list<int> fist;
	fist.push_back(1);
	fist.push_back(2);
	fist.push_back(3);
	auto it = fist.begin();
	for (auto &sh : fist)
	{
		cout << sh << " ";
	}
	cout << "\n";
}
void test5()
{
	list<int> fist;
	fist.push_back(1);
	fist.push_back(2);
	fist.push_back(3);
	auto it = fist.begin();
	while (0)
	{
		(*it)++;
	}

}
void test6()
{
	list<int> fist;
	fist.push_back(2);
	fist.push_back(2);
	fist.push_back(3);
	for (auto ch : fist)
	{
		cout << ch<<" ";
	}
	fist.pop_back();
	fist.pop_back();
	fist.pop_back();
	fist.pop_back();
	fist.insert(fist.begin(), 1);
	fist.insert(fist.begin(), 1);
	fist.insert(fist.begin(),1);
	for (auto sh : fist)
	{
		cout << sh;
	}
}
void test7()
{
	list<int> fist;
	fist.erase(fist.begin());
	fist.erase(fist.begin());
	fist.erase(fist.begin());
	fist.erase(fist.begin());
	fist.erase(fist.begin());
	fist.erase(fist.begin());
	fist.erase(fist.begin());
	for (auto ch : fist)
	{
		cout << ch << " ";
	}
	cout << endl;
}
void test8()
{
	list<int> fist;
	fist.push_back(1);
	fist.push_back(2);
	fist.push_back(3);
	fist.pop_back();
	fist.clear();
	fist.push_back(3);

	for (auto sh : fist)
	{
		cout << sh;
	}
}
void test9()
{
	list<int> it;
	cout << it.size() << endl;
}
int main()
{
	test9();
	return 0;
}